<app-back-btn></app-back-btn>
<div class="page-title">
  <span class="title" *ngIf="!code">添加星级</span>
  <span class="title" *ngIf="code">修改星级</span>
</div>

<div class="page-msg m-15">
  <h3>功能描述</h3>
  <ul>
    <li *ngFor="let item of msgTip.level">{{item}}</li>
  </ul>
</div>

<div class="panel panel-body">
  <form nz-form [formGroup]="validateForm" class="form-wrap" (submit)="addStarLevel($event)">
    <h2 class="subtitle">星级信息</h2>

    <!--starLevel start-->
    <nz-form-item>
      <nz-form-label [nzSm]="7" nzFor="starLevel" nzRequired> 星级</nz-form-label>
      <nz-form-control [nzSm]="10" [nzValidateStatus]="getFormControl('starLevel')">
        <input nz-input formControlName="starLevel" type="text" id="starLevel" placeholder="星级" [readonly]="code">
        <nz-form-explain *ngIf="getFormControl('starLevel').dirty&&getFormControl('starLevel').errors">
          <ng-container *ngIf="getFormControl('starLevel').hasError('required')">请输入星级</ng-container>
        </nz-form-explain>
      </nz-form-control>
      <nz-form-control [nzSm]="7" class="font12 pl color-gray">
        星级
      </nz-form-control>
    </nz-form-item>

    <!--starLevel start-->
    <nz-form-item>
      <nz-form-label [nzSm]="7" nzFor="starLevel" nzRequired> 星级名</nz-form-label>
      <nz-form-control [nzSm]="10" [nzValidateStatus]="getFormControl('starLevel')">
        <input nz-input formControlName="starLevel" type="text" id="starName" placeholder="星级名" [readonly]="code">
        <nz-form-explain *ngIf="getFormControl('starLevel').dirty&&getFormControl('starLevel').errors">
        </nz-form-explain>
      </nz-form-control>
      <nz-form-control [nzSm]="7" class="font12 pl color-gray">
        星级名
      </nz-form-control>
    </nz-form-item>

    <!--deposit start-->
    <nz-form-item>
      <nz-form-label [nzSm]="7" nzFor="deposit" nzRequired> 升级押金</nz-form-label>
      <nz-form-control [nzSm]="10" [nzValidateStatus]="getFormControl('deposit')">
        <input nz-input formControlName="deposit" type="number" id="deposit" placeholder="升级押金">
        <nz-form-explain *ngIf="getFormControl('deposit').dirty&&getFormControl('deposit').errors">
          <ng-container *ngIf="getFormControl('deposit').hasError('required')">请输入升级押金</ng-container>
        </nz-form-explain>
      </nz-form-control>
      <nz-form-control [nzSm]="7" class="font12 pl color-gray">
        升级押金
      </nz-form-control>
    </nz-form-item>


    <!--multiple start-->
    <nz-form-item>
      <nz-form-label [nzSm]="7" nzFor="multiple" nzRequired>动态收益</nz-form-label>
      <nz-form-control [nzSm]="10" [nzValidateStatus]="getFormControl('multiple')">
        <input nz-input formControlName="multiple" type="number" id="multiple" placeholder="动态收益上限倍数">
        <nz-form-explain *ngIf="getFormControl('multiple').dirty&&getFormControl('multiple').errors">
          <ng-container *ngIf="getFormControl('multiple').hasError('required')">请输入动态收益上限倍数</ng-container>
        </nz-form-explain>
      </nz-form-control>
      <nz-form-control [nzSm]="7" class="font12 pl color-gray">
        动态收益上限倍数
      </nz-form-control>
    </nz-form-item>

    <!--withdrawCashRate start-->
    <nz-form-item>
      <nz-form-label [nzSm]="7" nzFor="withdrawCashRate" nzRequired>提现释放比例</nz-form-label>
      <nz-form-control [nzSm]="10" [nzValidateStatus]="getFormControl('withdrawCashRate')">
        <nz-input-group nzAddOnAfter="%">
          <input nz-input formControlName="withdrawCashRate" type="number" id="withdrawCashRate" placeholder="金兰宝提现释放比例">
        </nz-input-group>
        <nz-form-explain *ngIf="getFormControl('withdrawCashRate').dirty&&getFormControl('withdrawCashRate').errors">
          <ng-container *ngIf="getFormControl('withdrawCashRate').hasError('required')">请输入金兰宝提现释放比例</ng-container>
        </nz-form-explain>
      </nz-form-control>
      <nz-form-control [nzSm]="7" class="font12 pl color-gray">
        金兰宝提现释放比例
      </nz-form-control>
    </nz-form-item>

    <!--withdrawCashRate start-->
    <nz-form-item>
      <nz-form-label [nzSm]="7" nzFor="oreRefiningRate" nzRequired>矿石提炼比</nz-form-label>
      <nz-form-control [nzSm]="10" [nzValidateStatus]="getFormControl('oreRefiningRate')">
        <nz-input-group nzAddOnAfter="%">
          <input nz-input formControlName="oreRefiningRate" type="number" id="oreRefiningRate" placeholder="矿石提炼比">
        </nz-input-group>
        <nz-form-explain *ngIf="getFormControl('oreRefiningRate').dirty&&getFormControl('oreRefiningRate').errors">
          <ng-container *ngIf="getFormControl('oreRefiningRate').hasError('required')">请输入矿石提炼比</ng-container>
        </nz-form-explain>
      </nz-form-control>
      <nz-form-control [nzSm]="7" class="font12 pl color-gray">
        矿石提炼比
      </nz-form-control>
    </nz-form-item>

    <!--表单底部start-->
    <nz-form-item class="action-button">
      <nz-form-control class="text-center">
        <button nz-button [nzType]="'primary'" type="submit" class="pl-30 pr-30" [nzLoading]="isConfirmLoading">
          确定
        </button>
      </nz-form-control>
    </nz-form-item>
    <!--表单底部end-->
  </form>

</div>
